* lisp/outline.el: Improve new feature of preserving outlines after revert.
authorJuri Linkov <juri@linkov.net>
Mon, 10 Jun 2024 06:34:15 +0000 (09:34 +0300)
committerJuri Linkov <juri@linkov.net>
Mon, 10 Jun 2024 06:34:15 +0000 (09:34 +0300)
commit1a5aa16066bb5180eb92d9c0bfc8cb2c0ce4a4d0
treed76ceb3f84ad5fa6c7ed76272778d359f9227146
parentbd80717d8e762c7559f66d297cdb6144e3f7f958
* lisp/outline.el: Improve new feature of preserving outlines after revert.

(outline-minor-mode): Move adding hook 'outline-revert-buffer-rehighlight'
to the same code branch that calls 'outline-minor-mode-highlight-buffer'.
(outline-revert-buffer-rehighlight): Remove same conditions
already existing in 'outline-minor-mode'.
(outline-hidden-headings-regexp): Remove function.
(outline-hidden-headings-paths)
(outline-hidden-headings-restore-paths): New functions
that save and restore complete paths instead of flat regexps.
(outline-revert-buffer-restore-visibility): Use
'outline-hidden-headings-paths' and
'outline-hidden-headings-restore-paths'.
lisp/outline.el